package nc.gk.gkxm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import nc.gk.gkxm.model.entity.User;
import org.apache.ibatis.annotations.Select;

public interface UserMapper extends BaseMapper<User> {


    /**
     * 根据openid查询用户
     * @param openid
     * @return
     */
    @Select("select * from gk_user where appid = #{openid}")
    User getUserByOpenId(String openid);

    @Select("select * from gk_user where code= #{code}")
    User getUserByCode(String code);
}
